from .base_command import BaseCommand
from tjob.version import version as __version__
from cleo.helpers import argument, option


class VersionCommand(BaseCommand):
    name = "version"
    description = "Shows the version of tjob."
    arguments = [
        argument(
            "version",
            "The version number or the rule to update the version.",
            optional=True,
        )
    ]
    options = [
        option("short", "s", "Output the version number only"),
        option(
            "dry-run",
            None,
            "Do not update pyproject.toml file",
        ),
    ]

    def handle(self):
        self.blue_text(f"<w> tjob <info> {__version__}")
        self.blue_text("<w> \n Perception-Model-Infra ")
